//
//  MovieCollectionTableViewCell.m
//  豆瓣
//
//  Created by Roach on 16/6/25.
//  Copyright © 2016年 lanou. All rights reserved.
//


#import "MovieCollectionTableViewCell.h"
#import "MovieModel.h"

@interface MovieCollectionTableViewCell ()

@property (nonatomic, retain) UILabel *nameLabel;
@property (nonatomic, retain) UIImageView *pictureImageView;


@end


@implementation MovieCollectionTableViewCell

- (void)dealloc {
    
    [_nameLabel release];
    [_pictureImageView release];
    
    [_movieModel release];
    [super dealloc];
    
}

- (instancetype) initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    
    if (self) {
        
        self.nameLabel = [[[UILabel alloc]init]init];
        [self.contentView addSubview:_nameLabel];
        [_nameLabel release];
        
        self.pictureImageView = [[UIImageView alloc]init];
        [self.contentView addSubview:_pictureImageView];
        [_pictureImageView release];
        
    }
    return self;
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    self.pictureImageView.frame = self.contentView.bounds;
    
    self.nameLabel.frame = CGRectMake(self.pictureImageView.frame.origin.x, self.contentView.frame.size.height, self.contentView.frame.size.width, 30);
    
}

- (void)setMovieModel:(MovieModel *)movieModel{
    
    if (_movieModel != movieModel) {
        [_movieModel release];
        movieModel = [_movieModel retain];
    }
    
    
    
}

@end
